package br.ita.comp.ces22.quiz.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name ="question")
@NamedQueries({
		@NamedQuery(name="Question.findById", 
				query = "SELECT q FROM question q WHERE q.id = :id"),
		@NamedQuery(name="Question.findAll",
				query = "SELECT * FROM question")
})	
public class Question implements Serializable {
	static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue()
	@Column(name="idquestion")
	private Integer idQuestion;
	
	@Column(name="question")
	private String question;
	
	@Column(name="alternative1")
	private String alternative1;
	
	@Column(name="alternative2")
	private String alternative2;
	
	@Column(name="alternative3")
	private String alternative3;
	
	@Column(name="alternative4")
	private String alternative4;
	
	@Column(name="alternative5")
	private String alternative5;
	
	@Column(name="rightans")
	private Integer rightAns;
	
	public String getAlternative1() {
		return alternative1;
	}
	public void setAlternative1(String alternative1) {
		this.alternative1 = alternative1;
	}
	public String getAlternative2() {
		return alternative2;
	}
	public void setAlternative2(String alternative2) {
		this.alternative2 = alternative2;
	}
	public String getAlternative3() {
		return alternative3;
	}
	public void setAlternative3(String alternative3) {
		this.alternative3 = alternative3;
	}
	public String getAlternative4() {
		return alternative4;
	}
	public void setAlternative4(String alternative4) {
		this.alternative4 = alternative4;
	}
	public String getAlternative5() {
		return alternative5;
	}
	public void setAlternative5(String alternative5) {
		this.alternative5 = alternative5;
	}
	public Integer getIdQuestion() {
		return idQuestion;
	}
	public void setIdQuestion(Integer idQuestion) {
		this.idQuestion = idQuestion;
	}
	public Integer getRightAns() {
		return rightAns;
	}
	public void setRightAns(Integer rightAns) {
		this.rightAns = rightAns;
	}
	public String getQuestion() {
		return question;
	}
	public void setQuestion(String question) {
		this.question = question;
	}
}
